import cv2
video=cv2.VideoCapture("yzbf.mp4")
while(video.isOpened()):
    retval,image=video.read()
    cv2.namedWindow("Video",0)
    cv2.resizeWindow("Video",420,300)
    if retval==True:
        cv2.imshow("Video",image)
    else:
       break
    key=cv2.waitKey(1)
    if key==27:
        break
video.release()
cv2.destroyAllWindows()